<div>
    <input class="input-block-level" type="hidden" value="<?=$this->model->getTermId()?>" name="term-id" id="term-id">
    <label for="term-title">Заголовок:</label>
    <input class="input-block-level" type="text" value="<?=$this->model->getTermName()?>" placeholder="Заголовок" name="term-title" id="term-title">
    <label for="term-symbol">Первая буква:</label>
    <input class="input-block-level" type="text" value="<?=$this->model->getFirstSymbol()?>" placeholder="Первая буква" name="term-symbol" id="term-symbol">
    <div class="term-tag">
        <h6><i class="icon-tags"></i>Теги:</h6>
        <? if ($this->model->getTags()):?>
            <? foreach($this->model->getTags() as $tag):?>
                <?/** @var $tag Application_Model_Tag */?>
                <span class="label">
                            <a class="label" href="/study/?tag=<?=$tag->getTagId()?>"><?= $tag->getTagName();?></a>
                            <i title="Удалить" class="icon-trash" onclick="study.deleteTag(<?=$tag->getTagId()?>, <?=$this->model->getTermId()?>, this)"></i>
                        </span>
            <? endforeach; ?>
        <? endif; ?>
        <span class="form-tag">
            <a onclick="study.showFormNewTag(this)" data-term="<?=$this->model->getTermId() ?>" class="label label-info">Добавить</a>
        </span>
    </div>
    <label for="term-content">Описание:</label>
    <textarea id="term-content" style="height:200px;"  name="term-content"><?=$this->model->getTermInfo()?></textarea>
    <div class="form-actions">
        <button type="submit" class="btn btn-primary" onclick="study.saveTerm()">Сохранить</button>
        <button type="button" class="btn" onclick="<?if (!$this->isAddMode):?> modal.close(); <? else: ?>study.deleteTermForm(<?=$this->model->getTermId()?>); <? endif; ?>">Отмена</button>
    </div>
</div>
<script type="text/javascript">
    (function(){
        $('#term-content').redactor();
    }());
</script>